package list_map;


import java.util.*;

/**
 * @program: javase
 * @description:
 * @author: lld
 * @create: 2020-11-03 19:06
 **/
public class arrayList {

    public static void main(String[] args) {

        //二分查找
        int i = Arrays.binarySearch(new Integer[]{1, 2, 3, 4, 5, 6}, 4);
        System.out.println(i);
        String s = Arrays.toString(new int[]{1, 2, 3, 4, 5, 6});
        System.out.println(s);
//        LinkedList linkedList=new LinkedList();
//        HashSet hashSet=new HashSet();
//        hashSet.add(null);
//        hashSet.add(12);
//        Iterator iterator = hashSet.iterator();
//        while (iterator.hasNext()){
//            System.out.println(iterator.next());
//        }
//
        ArrayList list=new ArrayList(2);
//        list.add(1);
//        list.add(2);
//        Iterator iterator1 = list.iterator();
//        while (iterator1.hasNext()){
//            System.out.println(iterator1.next());
//        }
//        list.forEach(System.out::println);

//        TreeSet<Object> objects = new TreeSet<>();
//
//        if(objects instanceof RandomAccess){
//
//        }

        ArrayList<Object> objects = new ArrayList<>(100);
        ArrayList<Object> objects2 = new ArrayList<>();
        objects2.ensureCapacity(100);
    }
}
